<template>
	<h2>资产分类汇总统计参数设置</h2>
		<el-form-item :label="model[globalparam.assetCategorySummaryStatistics.paramCode].paramName">
			<template v-for="item in configs">
				<div style="float:left;margin-left: 20px;">
					<ex-label code="MAIN_CATEGORY" :value="item.label"></ex-label>
					<ex-cascader v-model="model[globalparam.assetCategorySummaryStatistics.paramCode].paramValue[item.value]" dict-code="FamsAssetCategory" key-prop="id" multiple="true"></ex-cascader>
				</div>
			</template>
		</el-form-item>
</template>

<script>

import globalparam from "@/constant/model/globalparam";
import ExRadioGroup from "@/components/exRadioGroup/index.vue";
import ExCheckBox from "@/components/exCheckBox/index.vue";
import ExWidget from "@/components/exFormItem/widget.vue";
import ExLabel from "@/components/exLabel/index.vue";
import ExCascader from "@/components/exCascader/index.vue";

export default {
	name: 'assetCategorySummarySetting',
	computed: {
		globalparam() {
			return globalparam
		}
	},
	components: {ExCascader, ExLabel, ExWidget, ExCheckBox, ExRadioGroup},
	props: {
		model: {type: Object, default: {}}
	},
	data() {
		return {
			params: [
				globalparam.assetCategorySummaryStatistics,
			],
			configs:[],
		}
	},
	async created() {
		this.params.forEach(item => {
			if (!this.model[item.paramCode]) {
				this.model[item.paramCode] = item;
			}else{
				this.model[item.paramCode].paramName = item.paramName;
			}
		});
		this.configs = await this.$cache.dic.options('MAIN_CATEGORY');
		//console.log(this.configs)
	},
	mounted() {
	},
	methods: {}
}
</script>
